package com.qingcheng.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;

/**
 * @author lin.jia
 */
@ToString
@Data
@AllArgsConstructor
public class Result implements Serializable {

    /**
     * 业务返回码  0：成功  1:错误
     */
    private Integer code;

    /**
     * 消息
     */
    private String message;

    /**
     * 数据
     */
    private Object data;

    public Result(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Result() {
        this.code = 0;
        this.message = "执行成功";
    }
}
